package com.zfc.life.service.impl;

import com.zfc.life.domain.Users;
import com.zfc.life.mapper.UsersMapper;
import com.zfc.life.service.UsersService;
import com.zfc.life.utils.AESCipher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author zfc
 * @since 2024-05-23
 */
@Service
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;
    @Override
    public Users    selectByLoginNameAndLoginPassword(Users users) {
        users.setLoginPassword(AESCipher.encrypt_password(users.getLoginPassword()));
        return usersMapper.selectByLoginNameAndLoginPassword(users);
    }
}
